<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page import="java.util.*" %>
    <%@ page import="Beans.Veiling" %>
   
    <%@ page import="Database.DBmanager" %>
    
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

	<form action="testServlet" method="post">
         
         <input type="submit" value="Submit" />
      </form> 
	

	<%
		
		LinkedList<Veiling> mvs = (LinkedList<Veiling>)request.getAttribute("veilingen");
		Iterator<Veiling> i = mvs.iterator();
		int cellCount = 0;
		int maxCols = 3;
		
		out.println("<table border=\"1\" style = \"width:1000px;text-align:center;vertical-align:middle;border:0\">");
		
		while (i.hasNext()) {
			Veiling v = i.next();
			if(cellCount % maxCols == 0)out.print("<tr>");
			out.println("<td class=\" tablecell \" >");
			out.println(""+ v.getNaam()+"<br />");
			out.println(" <img src=\"" + v.getImageURL() + "\" style=\"max-width:200px;max-height:200px;\"  />");
			out.println("</td>");
			//Bieding b = DBmanager.getBiedingByID(v.getHoogBod());
			//out.println("<li>"+ b.getBodHoogteInCenten()/100 + "." + b.getBodHoogteInCenten()%100);
			
			if(cellCount % maxCols == maxCols-1)out.print("</tr>");
			cellCount++;
			
		}
		
		out.print("</table>");
	%>


</body>
</html>